﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="EditCustomers.aspx.cs" Inherits="admin_EditCustomers" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 191px;
        }
        .style2
        {
            width: 122px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderContent" Runat="Server">

<asp:FormView ID="FormViewCustomer" runat="server">
        <ItemTemplate>
            <table style="width: 100%;">
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label6" runat="server" Text="*First name"></asp:Label>
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="txtFirstname" runat="server" Width="180px" Text='<%#Eval("cus_firstname")%>'></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="rqFirstname" runat="server" ControlToValidate="txtFirstname"
                            ErrorMessage=" Please enter First name" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label7" runat="server" Text="*Last name"></asp:Label>
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="txtLastname" runat="server" Width="180px" Text='<%#Eval("cus_lastname")%>'></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="rqLastname" runat="server" ControlToValidate="txtLastname"
                            ErrorMessage="Please enter Last name" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="lblBirthdate" runat="server" Text="*Birth date"></asp:Label>
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="txtBirthdate" runat="server" Width="180px" Text='<%#Eval("cus_dateOfbirth")%>'></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="rqBirthdate" runat="server" ControlToValidate="txtBirthdate"
                            ErrorMessage="Please enter your birthdate (mm/dd/yyyy)" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label8" runat="server" Text="Gender"></asp:Label>
                        <br />
                    </td>
                    <td class="style1">
                        <asp:DropDownList ID="DropDownListGender" runat="server">
                            <asp:ListItem>--Select gender--</asp:ListItem>
                            <asp:ListItem>Male</asp:ListItem>
                            <asp:ListItem>Female</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label2" runat="server" Text="*Email"></asp:Label>
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="txtEmail" runat="server" Width="180px" Text='<%#Eval("cus_email")%>'></asp:TextBox>
                    </td>
                    <td>
                        <asp:RegularExpressionValidator ID="regxEmail" runat="server" ControlToValidate="txtEmail"
                            ErrorMessage="Please enter a email example format&lt;br&gt; yourmail@domain.com"
                            SetFocusOnError="True" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                        <br />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEmail"
                            ErrorMessage="Please enter email"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label9" runat="server" Text="*Phone number"></asp:Label>
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="txtPhone" runat="server" Width="180px" Text='<%#Eval("cus_phone")%>'></asp:TextBox>
                    </td>
                    <td>
                        <asp:RegularExpressionValidator ID="rqregxPhone" runat="server" ControlToValidate="txtPhone"
                            ErrorMessage="Please enter a phone in the format&lt;br&gt; ######### or ########## "
                            SetFocusOnError="True" ValidationExpression="\d{10,11}"></asp:RegularExpressionValidator>
                        <br />
                        <asp:RequiredFieldValidator ID="rqPhone" runat="server" ControlToValidate="txtPhone"
                            ErrorMessage="Please enter your phone number"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label3" runat="server" Text="*Password"></asp:Label>
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" Width="180px"></asp:TextBox>
                    </td>
                    <td>
                        <%--<asp:RequiredFieldValidator ID="rdPassword" runat="server" ControlToValidate="txtPassword"
                            ErrorMessage="Please enter your pass word"></asp:RequiredFieldValidator>--%>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label4" runat="server" Text="*Re-Password"></asp:Label>
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="txtRePassword" runat="server" TextMode="Password" Width="180px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="rqRepass" runat="server" ControlToValidate="txtRePassword"
                            ErrorMessage="Please enter confirm password" SetFocusOnError="True"></asp:RequiredFieldValidator>
                        <br />
                        <asp:CompareValidator ID="cvPassword" runat="server" ControlToCompare="txtPassword"
                            ControlToValidate="txtRePassword" ErrorMessage="Invalid confirm password" SetFocusOnError="True"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="Label10" runat="server" Text="*Address"></asp:Label>
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="txtAddress" runat="server" Width="180px" Text='<%#Eval("cus_address")%>'></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtAddress"
                            ErrorMessage="Please enter your address"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        &nbsp;
                    </td>
                    <td class="style1">
                        <asp:Button ID="btnEdit" runat="server" Text="Edit Customer" OnClick="btnEdit_Click" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:FormView>
</asp:Content>

